package com.demo.beans;
public class User {
    private String name;

    public User() {
        System.out.println("--User类的无参构造方法被调用，生成User对象并交给Spring容器管理");
    }

    public void setName(String name){
        System.out.println("--User类的setName方法被调用，设置值："+name);
        this.name = name;
    }


    public void show(){
        System.out.println(name +":欢迎使用Spring框架");
    }
}